package com.changfeng.controller;

import com.changfeng.bean.dto.vo.CountryListVO;
import com.changfeng.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/country")
public class CountryController {

    @Autowired
    private CountryService countryService;

    @GetMapping("/findByAll")
    public List<CountryListVO> findByAll() {
        return countryService.findAllByVO();
    }
}
